from abc import ABC, abstractmethod
from PIL import Image
from ui import ImageProcessorUI

class ImageProcessor(ABC):
    @abstractmethod
    def process(self, image: Image.Image, **kwargs) -> Image.Image:
        """处理图像"""
        pass

    @abstractmethod
    def get_ui_parameters(self, ui: "ImageProcessorUI") -> dict:
        """
        从 UI 获取当前面板的参数。
        返回一个字典，供 process 使用。
        """
        pass